import React from 'react';
import PropTypes from 'prop-types';
import { Divider, Button } from 'antd';
import './index.less';
const prefixCls = 'table-sreach-filter';

const TableSreachFilter = props => {
  const { filterClear, filterOnOk } = props;
  const clear = () => {
    filterClear();
  };
  const onOk = () => {
    filterOnOk();
  };

  const { domContent } = props;
  return (
    <div className={prefixCls}>
      <div className={`${prefixCls}-content`}>{domContent()}</div>
      <Divider />
      <div className={`${prefixCls}-footer`}>
        <Button type="link" onClick={onOk}>
          确定
        </Button>
        <Button type="link" disabled={''} onClick={clear}>
          重置
        </Button>
      </div>
    </div>
  );
};

TableSreachFilter.propTypes = {
  domContent: PropTypes.func,
  filterClear: PropTypes.func,
  filterOnOk: PropTypes.func
};
export default TableSreachFilter;
